package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class PWDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("pw.txt");
//        OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
//        BufferedWriter bw = new BufferedWriter(osw);
//        bw.write("2231");
//        bw.write("fasfsa");
//        System.out.println("写出完毕");
//        bw.close();
        PrintWriter pw = new PrintWriter("pw.txt");
        pw.println("sfda ");
        pw.println("sfads");
        System.out.println("写出完毕");
        pw.close();
    }
}
